home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / idioms.lha / idioms / 3-10.h < prev    next >
C/C++ Source or Header  |  1993-08-08  |  514b  |  26 lines

  1. /* Copyright (c) 1992 by AT&T Bell Laboratories. */
  2. /* Advanced C++ Programming Styles and Idioms */
  3. /* James O. Coplien */
  4. /* All rights reserved. */
  5.  
  6. #include <stdlib.h>
  7. #include <string.h>
  8.  
  9. class String;
  10.  
  11. class StringRep {
  12. friend String;
  13. private:
  14.     StringRep();
  15.     StringRep(const StringRep& s);
  16.     ~StringRep();
  17.     StringRep(const char *s);
  18.     String operator+(const String&) const;
  19.     int length() const;
  20.     void print() const;
  21. private:
  22.     StringRep(char** const r);
  23.     char *rep;
  24.     int count;
  25. };
  26.